package cn.wolfcode.servlet;

import cn.wolfcode.dao.impl.StudentDAOImpl;
import cn.wolfcode.domain.Student;
import cn.wolfcode.service.impl.StudentServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class StudentAddServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String username = req.getParameter("username");
        String password = req.getParameter("password");

        StudentDAOImpl sd = new StudentDAOImpl();
        //sd.save(username,password);

        //List<Student> students = sd.selectAll();
        //req.setAttribute("list",students);
        req.getRequestDispatcher("/show.jsp").forward(req, resp);
    }
}
